<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>最简单的打开保存文件</title>
    <style>
        *{
            margin : 0;
            padding : 0;
        }
        div{
            position : absolute;
            width : 100%;
            height : 100%;
            overflow: hidden;
        }

    </style>
</head>
<body>
<div  th:utext="${poHtmlCode}"></div>
<script>
    function Save() {
        pageofficectrl.WebSave();
    }
    function SaveAs() {
        pageofficectrl.ShowDialog(3);
    }
    function PrintSet() {
        pageofficectrl.ShowDialog(5);
    }
    function PrintFile() {
        pageofficectrl.ShowDialog(4);
    }
    function Close() {
        window.external.close();
    }
    function IsFullScreen() {
        pageofficectrl.FullScreen =
            !pageofficectrl.FullScreen;
    }

    function OnPageOfficeCtrlInit() {
        pageofficectrl.AddCustomToolButton("保存", "Save", 1);
        pageofficectrl.AddCustomToolButton("另存为", "SaveAs", 12);
        pageofficectrl.AddCustomToolButton("打印设置", "PrintSet", 0);
        pageofficectrl.AddCustomToolButton("打印", "PrintFile", 6);
        pageofficectrl.AddCustomToolButton("全屏/还原", "IsFullScreen", 4);
        pageofficectrl.AddCustomToolButton("-", "", 0);
        pageofficectrl.AddCustomToolButton("关闭", "Close", 21);
    }

</script>
</body>
</html>